package com.chengwang.bookstory.mapper;

import com.chengwang.bookstory.pojo.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface BookMapper {
    List<Book> queryByBookType(String bookType);
    List<Book> queryByBookName(String bookName);

    List<Book> queryByAnyType(String searchMessage);

    void updateByidNumMap(@Param("idNumMap") Map<String, Integer> idNumMap);
    List<Book> queryById(@Param("IdNumMap") Map<String, Integer> IdNumMap);

    void updateByid(int bookNumber,String bookId);

    List<Book> queryAllBook();

    Book queryBookById(String bookId);

    void updateBook(Book book);

    void upload(Book book);

    List<Book> queryBookByBookName(String bookName);
}
